package org.netEase.controller;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.netEase.dao.zhutizuDao;
import org.netEase.dao.impl.zhutizuDaoImpl;
import org.netEase.entity.zhuti;
import org.netEase.entity.zhutizu;

import com.alibaba.fastjson.JSON;
@WebServlet(urlPatterns= {"/backstageManager/zhutizu.shtml"})
public class Houtaizhutizu extends HttpServlet {
	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("utf-8");
		zhutizuDao zhutizuDao = new zhutizuDaoImpl();
		List<zhutizu> list=zhutizuDao.getbyYids();
		request.setAttribute("zhutizu", list);
		request.getRequestDispatcher("/backstageManager/product-category.jsp").forward(request, response);
	}

	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		this.doGet(request, response);
	}
}
